package com.milk.system.converter;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.milk.system.model.entity.Merchants;
import com.milk.system.model.form.MerchantsForm;
import com.milk.system.model.vo.MerchantsPageVO;
import org.mapstruct.InheritInverseConfiguration;
import org.mapstruct.Mapper;

/**
 * 商家信息表转换器
 *
 * @author milk
 * @since 2024-05-02
 */
@Mapper(componentModel = "spring")
public interface MerchantsConverter{

    MerchantsPageVO bo2PageVo(Merchants entity);

    Page<MerchantsPageVO> bo2PageVo(Page<Merchants> entityVo);

    MerchantsForm entity2Form(Merchants entity);

    @InheritInverseConfiguration(name = "entity2Form")
    Merchants form2Entity(MerchantsForm entity);
}
